package com.repair.base.response;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * @author chunyu
 * @since 2024/9/19,21:13
 */
@Setter
@Getter
public class ListResponse<T> extends BaseResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    private List<T> data;

    public static <T> ListResponse<T> set(List<T> data) {
        ListResponse<T> listResponse = new ListResponse<>();
        listResponse.setSuccess(true);
        listResponse.setData(data);
        return listResponse;
    }

}
